import jsonpickle


def getuser(request):
    """
        获取用户信息
    """
    user = request.session.get('user', '')
    if user:
        user = jsonpickle.loads(user)
    return {'user': user}
